home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 924 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: rover.ucs.ualberta.ca!news
  2. From: ryangall@gpu.srv.ualberta.ca (Bobby Sixkiller)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Directory tree search??
  5. Date: 10 Jan 1996 07:45:43 GMT
  6. Organization: University of Alberta, Edmonton, Canada
  7. Message-ID: <4cvqr7$s8s@pulp.ucs.ualberta.ca>
  8. References: <4cv94u$90v@news2.realtime.net>
  9. NNTP-Posting-Host: async4-15.remote.ualberta.ca
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.99.2
  12.  
  13. In article <4cv94u$90v@news2.realtime.net>, cds@ballistic.com says...
  14. >
  15. >I'm looking for an algorithm to search the directory structure for a
  16. >particular file.  Any suggestion??
  17. >
  18. >Shawn L. Bradley
  19. >
  20. >CADD Design Solutions
  21. >cds@ballistic.com
  22. >
  23.  If you are just using ANSI C ...forget it, but your probably not. If you 
  24. have access to a findfirst() / findnext() type function, you can easily do 
  25. a search using a recursive procedure. I wrote one that works pretty 
  26. good....for Borland Turbo C++, If you want me to sent it to you, you can 
  27. mail me and Ill send it...its not long...but I use alot of space doing 
  28. error checking!
  29.  
  30.